/**
 * Created by Wilson on 1/23/2015.
 */
(function () {
    angular.module('app')
        .factory('carService', carService);

    carService.$inject = ['$window', 'httpService', 'configManager', 'userService'];
    function carService($window, httpService, configManager, userService) {
        var Fac = {
            getAllBrandList: getAllBrandList,
            queryMyCarList: queryMyCarList,
            confirmModel: confirmModel
        };

        function confirmModel(modelId) {
            var params = {
                carId: modelId
            }
            var url = configManager.HOST + 'userCar/addMemberCar'
            return httpService.httpPost(url, params);
        }

        function queryMyCarList() {
            var url = configManager.HOST + 'userCar/queryMemberCar'
            return httpService.httpPost(url);

        }

        function getAllBrandList() {
            var url = configManager.HOST + 'brand/queryAllBrand'
            return httpService.httpPost(url);
        }

        return Fac;
    }
})();